home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_dBASE / Fleet / Aircraft.wfm < prev    next >
Encoding:
Text File  |  1997-11-20  |  6.6 KB  |  293 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  Aircraft.wfm --  Aircraft data view and edit form.
  4. //
  5. //  This form displays data from the Aircraft table and
  6. //  allows for the editing of existing records. Users can
  7. //  double-click on the image to update it.
  8. //
  9. //  Dependencies: AIRCRAFT.DBF
  10. //                FLEET.CFM
  11. //
  12. //  Visual dBASE Samples Group
  13. //
  14. //  $Revision:   1.8  $
  15. //
  16. //  Copyright (c) 1997, Borland International, Inc. 
  17. //  All rights reserved.
  18. //
  19. //---------------------------------------------------------------
  20. SET TALK OFF
  21. ** END HEADER -- do not remove this line
  22. //
  23. // Generated on 11/02/97
  24. //
  25. parameter bModal
  26. local f
  27. f = new aircraftForm()
  28. if (bModal)
  29.    f.mdi = false // ensure not MDI
  30.    f.readModal()
  31. else
  32.    f.open()
  33. endif
  34.  
  35. class aircraftForm of FLEETCFORM from "FLEET.CFM"
  36.    with (this)
  37.       height = 15
  38.       left = 8.6667
  39.       top = 0.56
  40.       width = 53
  41.       text = "Aircraft Information"
  42.       mdi = false
  43.       scrollBar = 2
  44.    endwith
  45.  
  46.  
  47.    this.DMAIRCRAFT = new DATAMODREF()
  48.    this.DMAIRCRAFT.parent = this
  49.    with (this.DMAIRCRAFT)
  50.       filename = "AIRCRAFT.DMD"
  51.       dataModClass = "aircraftDataModule"
  52.       share = 0
  53.       active = true
  54.       left = 4.6667
  55.       top = 1.6923
  56.    endwith
  57.  
  58.  
  59.    this.IMAGEIMAGE1 = new IMAGE(this)
  60.    with (this.IMAGEIMAGE1)
  61.       onLeftDblClick = class::IMAGEIMAGE1_ONLEFTDBLCLICK
  62.       height = 5
  63.       left = 2
  64.       top = 8.5
  65.       width = 50
  66.       metric = 0
  67.       dataSource = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Layout Image"]
  68.       alignment = 3
  69.       mousePointer = 1
  70.       borderStyle = 7
  71.    endwith
  72.  
  73.  
  74.    this.SPINBOXAIRCRAFTID1 = new SPINBOX(this)
  75.    with (this.SPINBOXAIRCRAFTID1)
  76.       enabled = false
  77.       height = 1
  78.       left = 22
  79.       top = 2
  80.       width = 10
  81.       metric = 0
  82.       dataLink = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Aircraft ID"]
  83.       picture = "999999"
  84.       colorHighLight = ""
  85.       fontName = "MS Sans Serif"
  86.       fontSize = 8
  87.       validRequired = true
  88.       borderStyle = 7
  89.    endwith
  90.  
  91.  
  92.    this.ENTRYFIELDMAKE1 = new ENTRYFIELD(this)
  93.    with (this.ENTRYFIELDMAKE1)
  94.       height = 1
  95.       left = 22
  96.       top = 3
  97.       width = 12
  98.       metric = 0
  99.       dataLink = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Make"]
  100.       colorHighLight = ""
  101.       fontName = "MS Sans Serif"
  102.       fontSize = 8
  103.       borderStyle = 7
  104.    endwith
  105.  
  106.  
  107.    this.ENTRYFIELDAIRCRAFT1 = new ENTRYFIELD(this)
  108.    with (this.ENTRYFIELDAIRCRAFT1)
  109.       height = 1
  110.       left = 22
  111.       top = 4
  112.       width = 15
  113.       metric = 0
  114.       dataLink = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Model"]
  115.       colorHighLight = ""
  116.       fontName = "MS Sans Serif"
  117.       fontSize = 8
  118.       validRequired = true
  119.       borderStyle = 7
  120.    endwith
  121.  
  122.  
  123.    this.SPINBOXCREW1 = new SPINBOX(this)
  124.    with (this.SPINBOXCREW1)
  125.       height = 1
  126.       left = 22
  127.       top = 5
  128.       width = 9
  129.       metric = 0
  130.       dataLink = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Crew"]
  131.       picture = "999"
  132.       colorHighLight = ""
  133.       fontName = "MS Sans Serif"
  134.       fontSize = 8
  135.       validRequired = true
  136.       borderStyle = 7
  137.    endwith
  138.  
  139.  
  140.    this.SPINBOXPASSENGER1 = new SPINBOX(this)
  141.    with (this.SPINBOXPASSENGER1)
  142.       height = 1
  143.       left = 22
  144.       top = 6
  145.       width = 9
  146.       metric = 0
  147.       dataLink = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Passengers"]
  148.       picture = "999"
  149.       colorHighLight = ""
  150.       fontName = "MS Sans Serif"
  151.       fontSize = 8
  152.       validRequired = true
  153.       borderStyle = 7
  154.    endwith
  155.  
  156.  
  157.    this.SPINBOXMANUFACTURE1 = new SPINBOX(this)
  158.    with (this.SPINBOXMANUFACTURE1)
  159.       height = 1
  160.       left = 22
  161.       top = 7
  162.       width = 13
  163.       metric = 0
  164.       dataLink = form.DMAIRCRAFT.ref.aircraft1.rowset.fields["Date of Manufacture"]
  165.       colorHighLight = ""
  166.       rangeMax = {12/01/97}
  167.       rangeMin = {08/23/97}
  168.       fontName = "MS Sans Serif"
  169.       fontSize = 8
  170.       validRequired = true
  171.       borderStyle = 7
  172.    endwith
  173.  
  174.  
  175.    this.TITLE1 = new TEXT(this)
  176.    with (this.TITLE1)
  177.       height = 1.6
  178.       left = 2
  179.       top = 0
  180.       width = 30
  181.       metric = 0
  182.       variableHeight = true
  183.       colorNormal = "darkblue"
  184.       transparent = true
  185.       fontSize = 18
  186.       text = "Aircraft"
  187.    endwith
  188.  
  189.  
  190.    this.LABELID = new TEXT(this)
  191.    with (this.LABELID)
  192.       height = 1
  193.       left = 2
  194.       top = 2
  195.       width = 19
  196.       metric = 0
  197.       colorNormal = "darkblue"
  198.       alignVertical = 1
  199.       transparent = true
  200.       fontName = "MS Sans Serif"
  201.       text = "ID:"
  202.    endwith
  203.  
  204.  
  205.    this.TEXTMAKE1 = new TEXT(this)
  206.    with (this.TEXTMAKE1)
  207.       height = 1
  208.       left = 2
  209.       top = 3
  210.       width = 12
  211.       metric = 0
  212.       colorNormal = "BtnText"
  213.       alignVertical = 1
  214.       transparent = true
  215.       fontName = "MS Sans Serif"
  216.       text = "Make"
  217.    endwith
  218.  
  219.  
  220.    this.LABELMODEL = new TEXT(this)
  221.    with (this.LABELMODEL)
  222.       height = 1
  223.       left = 2
  224.       top = 4
  225.       width = 19
  226.       metric = 0
  227.       colorNormal = "darkblue"
  228.       alignVertical = 1
  229.       transparent = true
  230.       fontName = "MS Sans Serif"
  231.       text = "Model:"
  232.    endwith
  233.  
  234.  
  235.    this.LABELCREW = new TEXT(this)
  236.    with (this.LABELCREW)
  237.       height = 1
  238.       left = 2
  239.       top = 5
  240.       width = 19
  241.       metric = 0
  242.       colorNormal = "darkblue"
  243.       alignVertical = 1
  244.       transparent = true
  245.       fontName = "MS Sans Serif"
  246.       text = "Crew:"
  247.    endwith
  248.  
  249.  
  250.    this.TEXTPASSENGER1 = new TEXT(this)
  251.    with (this.TEXTPASSENGER1)
  252.       height = 1
  253.       left = 2
  254.       top = 6
  255.       width = 19
  256.       metric = 0
  257.       colorNormal = "darkblue"
  258.       alignVertical = 1
  259.       transparent = true
  260.       fontName = "MS Sans Serif"
  261.       text = "Passengers:"
  262.    endwith
  263.  
  264.  
  265.    this.LABELMANUFACTURE = new TEXT(this)
  266.    with (this.LABELMANUFACTURE)
  267.       height = 1
  268.       left = 2
  269.       top = 7
  270.       width = 19
  271.       metric = 0
  272.       colorNormal = "darkblue"
  273.       alignVertical = 1
  274.       transparent = true
  275.       fontName = "MS Sans Serif"
  276.       text = "Date of Manufacture:"
  277.    endwith
  278.  
  279.  
  280.    this.rowset = this.DMAIRCRAFT.ref.aircraft1.rowset
  281.  
  282.    // {Linked Method} form.imageimage1.onLeftDblClick
  283.    function IMAGEIMAGE1_onLeftDblClick(flags, col, row)
  284.       local sImage, rAircraft
  285.       sImage = GETFILE("*.gif","Replace Aircraft Image",true)
  286.       rAircraft = this.form.DMAIRCRAFT.ref.aircraft1.rowset
  287.       if ( FILE( sImage ) )
  288.          rAircraft.fields["Layout Image"].replaceFromFile( sImage )
  289.          rAircraft.refreshControls()
  290.       endif
  291.    return ( sImage )
  292. endclass
  293.